package org.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.example.entity.SysUser;
import org.example.mapper.SysUserMapper;
import org.example.service.ISysUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysUserServiceImpl implements ISysUserService {
    @Resource
    private SysUserMapper sysUserMapper;
    @Override
    public SysUser findUserByUsername(String username) {
        QueryWrapper<SysUser> queryWrapper =new QueryWrapper<>();
        queryWrapper.eq("username",username);
        SysUser sysUser = sysUserMapper.selectOne(queryWrapper);
        return  sysUser;
    }
}
